package tedu.rocketmq.consumer;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;
import tedu.rocketmq.param.TeduUser;

@Component
@RocketMQMessageListener(
        topic = "user-topic02",
        consumerGroup = "test-user-2")
public class TeduUserConsumer implements RocketMQListener<TeduUser> {
    @Override
    public void onMessage(TeduUser message) {
        System.out.println("接收的消息:"+message);
    }
}
